nuke (1.41) - 'definitive' files eraser

[Note. This is Sergio Monesi's original 'help' file from version 1.40, with
only minor amendments by Nat Queen, to bring it up to date for version
1.41.]

nuke is a small disc utility that allows you to erase files from the disc
surface, filling their sectors with '0's or with a user-definable string.
nuke can also perform the same operation on all the free space of the disc so
that you can delete all the files you want in the usual way (eg. from the
filer) and then nuke the space they previously used on the disc.

nuke 1.41 is RISC OS 4 and 5 compatible.


Usage
-----

nuke [-options] [-s string] [-p pattern] [-n number] pathname
  -f   erase all the free space on disc
  -r   nuke directories recursively
  -y   don't ask for confirmation before nuking
  -s   fill nuked sectors with "string"
  -p   fill nuked sectors with numeric "pattern" (32 bit value)
  -R   fill nuked sectors with random data
  -v   verbose mode
  -n   overwrite the sectors "number" times
  -m   military mode... for paranoid people!
  -M   True Military (TM) mode... for extremely paranoid people!!

If "pathname" is a directory name the -r options must be specified (unless
you use -f, in which case the directory name will be ignored and the free
space will be nuked).

The -p option accepts numeric values (either decimal or hexadecimal preceded
by '&') which are always converted to 32 bit values. Hence, if you want to
fill the sectors with &11 you have to specify &11111111 otherwise the sectors
will be filled with &11000000.

The -m option can be used together with -n and one of -R, -s or -p, and it
performs the following wiping operations:

* 'n' overwrites with random data (where 'n' is as specified by -n,
  default to a single random overwrite) 
* one overwrite with &AA55AA55 fill pattern
* one overwrite with &55AA55AA fill pattern
* one overwrite with &00000000 fill pattern
* one overwrite with user-specified data (if the -R, -s or -p option is used,
  otherwise default to another &00000000 fill pattern)

The -M option is only intended to be used by very paranoid people that fear
their disc will be analysed with sophisticated equipment in order to get
their data back. However, this option overwrites the sectors 35 times with
various fill patterns and so it is very slow. The fill patterns used are the
ones suggested by Peter Gutmann in his "Secure Deletion of Data from Magnetic
and Solid-State Memory" paper which is available at the following URL:
http://www.cs.auckland.ac.nz/~pgut001/pubs/secure_del.html


Why can nuke be useful?
-----------------------

I wrote this simple program since I am going to sell my old A410 and I don't
like the idea that other people may be able to read some of my private data.
In fact 'undeleting' a file is almost impossible on RISC OS, but someone can
use a disc editor and (at least) read the text files (mails, sources, etc.)
and eventually some file that is quite easy to identify (GIF, Draw, etc.).
I think that nuke can be useful in a school or in any other environment where
someone has to use a 'public' computer and doesn't want to leave some private
(or compromising!) data on it.

I implemented the option to overwrite the sectors more than once because I
have been told that it could be possible to read part of the data if the
sector has been overwritten only once (using some particular equipment)... 
I think this is a bit paranoid, though!

The 'military' and 'True Military' options are intended for very paranoid
people but they are slow (because the sectors need to be overwritten more
than once, up to 35 times!) and so should not be generally used. I hope that
the 'True Military' option is enough for everybody, I've been surprised to
hear that the simple 'military' option wasn't up to its name...

The possibility to fill 'nuked' sectors with a user-defined string can be
useful to leave some funny message to the eventual curious... especially if
you *know* that someone will try to search for interesting text in the disc!

Since I think that not many people will use nuke, if you use it and/or if you
find some peculiar use for it, I'll be really pleased to hear from you!


Notes
-----

nuke only works on E-Format discs (it would be useless to use nuke into an
image filing system, just nuke the whole image file!).

The option to nuke the free space can be useful only if you want to 'clean' a
disc (for example before selling it) but the files/directories-nuke should be
better for 'everyday use' (!). In fact, overwriting all the free space can be
a long operation (especially if the disc is mostly empty).

If nuke is stopped while it is working it may happen that the files and the
directories are still present on the disc but the files' content has been
already overwritten. In fact, nuke fills the sectors first and then removes
the files using a common 'wipe' command.

nuke should work on discs formatted with RISC OS 4 or 5 (ie. with long
filenames and 'big' directories). However, I haven't been able to test it
myself so I can't guarantee it will work reliably (not that I can
*guarantee* it will work 100% *reliably* on RISC OS 3!) even if tests made
by other people worked without problems.

Currently (August 1999), nuke is my only disc tool that supports RISC OS 4
properly and it will probably be the only one for quite a long time (or
forever...). I know that there is a rather high interest in my fsck disc
fixer and RealCount (Filer count replacement) but I cannot commit myself to
any kind of upgrades right now.

[Note added by Nat Queen: I have tested all the options in Nuke 1.41 in
RISC OS 4 and 5, and have found no problems.]


Disclaimer
----------

nuke has been tested and always worked perfectly. Anyway, if it becomes crazy
and it starts overwriting random sectors, I am sorry but I accept no
responsibility for that! Use it at your own risk.


History
-------

1.00  -- 28 Nov 94
First released version.

1.02  -- 30 Jun 98
Added support for 'big' discs. Added numeric pattern and random sector fill.
Added 'military' option.

1.40  -- 21 Aug 99
Rewritten from scratch together with a new library to handle E-Format discs.
Improved random sector fill (more random!). Added -M (True Military) option.
Added full RISC OS 4 support.

1.41  -- 25 Aug 08
Re-compiled by Colin Ferris for 32-bit compatibility.


Thanks go to:
-------------

- Cristian Ghezzi for the idea to 'nuke' the free space.
- Tony Hopstaken for paranoid suggestions (and RISC OS 4 tests) and Nat Queen
  for even more paranoid ideas! ;-)
- Simon Proven for the help regarding new versions of FileCore.
- Julian Wright that recommended me to include the option to overwrite the
  sectors more than once and found a use for it... 


Conditions of use
-----------------

nuke is FreeWare: you can use and distribute it freely, provided that the
whole archive is copied unaltered (including this help file).


Contacting the Author
---------------------

Post:  Sergio Monesi
       Via Trento Trieste 30
       20046 Biassono (MI)
       Italy

EMail: sergio@monesi.com
       msergio@tin.it
       ghe0175@cdcsun.cdc.polimi.it
       sergio@freebsd.first.gmd.de

WWW:   http://www.monesi.com/sergio/
